package com.nbicc.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nbicc.pojo.Finan;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @ClassName:
 * @Author: 仄言in
 * @Desctiption: (描述)
 * @Date: 2021/5/10 20:15
 * @Version 1.0 (版本)
 */
@Repository
@Mapper
public interface FinanMapper extends BaseMapper<Finan> {
    @Select("select * from finaninfo where setcolumn= #{comm} or fname= #{comm}")
    List<Finan> selectAllSB(String comm);
    @Select("select sum(grantsum) from finaninfo")
    Double totalRow();
    @Insert("insert into finaninfo values(null,#{setcolumn},#{fdate},#{fname},#{huaname},#{grantsum},#{consum})")
    int insertFinan(Finan finan);
}
